﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Oscuridad;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            dados lanzamiento = new dados();
            
            string[] tiradas = textBox1.Text.Split(';');

            foreach (string tirada in tiradas)
            {
                tirada t = new tirada(tirada);
                lanzamiento.Add(t);
            }

            listBox1.Items.Clear();
            double[] results = lanzamiento.Lanzar();
            foreach (double result in results)
            {
                listBox1.Items.Add(result.ToString("#,##0"));
            }
        }
    }
}
